<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<script src="{yun:}$config.sy_weburl{/yun}/js/jquery-1.8.0.min.js?v={yun:}$config.cachecode{/yun}"></script>
<script src="js/admin_public.js?v={yun:}$config.cachecode{/yun}"></script>
<link href="{yun:}$config.sy_weburl{/yun}/js/layui/css/layui.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet">
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/layui.js?v={yun:}$config.cachecode{/yun}" language="javascript"></script>
<script src="{yun:}$config.sy_weburl{/yun}/js/layui/phpyun_layer.js?v={yun:}$config.cachecode{/yun}"></script>

<link href="images/reset.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/system.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />
<link href="images/table_form.css?v={yun:}$config.cachecode{/yun}" rel="stylesheet" type="text/css" />

<title>后台管理</title>
</head>
<body class="body_ifm">
<div id="infobox2" style="display:none;">
  <div class="admin_com_t_box"> 
      <form action="index.php?m=admin_partjob&c=ctime" target="supportiframe" method="post" id="formstatus">
      <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
    <div class="admin_com_smbox_list"><span class="admin_com_smbox_span">延长时间：</span>
   <input class="admin_com_smbox_text" value="" name="endtime" onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')"> <span class="admin_com_smbox_list_s">天</span>    </div>
    <div class="admin_com_smbox_opt"><input type="submit"  value='确认'class="admin_examine_bth"><input type="button"  onClick="layer.closeAll();"  class="admin_examine_bth_qx" value='取消'></div>
    
   
        <input name="jobid" value="0" type="hidden">
      </form> 
  </div>
</div>
<div id="infobox6"  style="display:none;">
  <div class="admin_com_t_box"> 
      <form action="index.php?m=admin_partjob&c=recommend" target="supportiframe" method="post" id="formstatus">
      <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
      <input type="hidden" name="codearr"> 
      
            <div class=" admin_com_smbox_list_pd">
          <span class="admin_com_smbox_span">推荐天数：</span>
  <input class="admin_com_smbox_text" value="" name="addday" \ onKeyUp="this.value=this.value.replace(/[^0-9]/g,'')"><span class="admin_com_smbox_list_s">天</span>    </div>
 <div class="edatediv" style="display:none"><span class="admin_com_smbox_span">当前结束日期：</span>
 <span class="admin_com_smbox_list_s edate" style="color:#f60"></span>
 </div>
  <div class="admin_com_smbox_qx_box"> 如需取消推荐职位请单击 <input type="checkbox" name="s" value="1"> 点击确认即可</div>
    <div class="clear"></div>
    <div class="admin_com_smbox_opt admin_com_smbox_opt_mt"><input type="submit" onclick="loadlayer();" value='确认' class="admin_examine_bth"><input type="button" onClick="layer.closeAll();"  class="admin_examine_bth_qx" value='取消'></div>
    
   
      <input name="pid" value="0" type="hidden">
      <input name="eid" value="0" type="hidden">
      </form> 
    </div>
  </div> 
<div id="status_div"  style="display:none; width: 380px; "> 
  <form class="layui-form" action="index.php?m=admin_partjob&c=status" target="supportiframe" method="post" id="formstatus">
  <input type="hidden" id="pytoken"name="pytoken" value="{yun:}$pytoken{/yun}">
   <table cellspacing='1' cellpadding='1' class="admin_examine_table">
     <tr>
    <th width="80">审核操作：</th>
     <td align="left">
    <div class="layui-form-item">
      <div class="layui-input-block">
        <input name="status" id="status0" value="0" title="未审核" type="radio"/>
        <input name="status" id="status1" value="1" title="正常" type="radio"/>
        <input name="status" id="status2" value="3" title="未通过" type="radio"/>
      </div>
    </div>
   </td>
        </tr>
    <tr>
            <th>审核说明：</th>
          <td>  
  <textarea id="alertcontent" name="statusbody"class="admin_explain_textarea"></textarea>
  </td>
         </tr> <tr>
              <td colspan='2' align="center"> 
              <input name="pid" value="0" type="hidden">
              <input type="submit"  value='确认' class="admin_examine_bth"> <input type="button" onClick="layer.closeAll();" class="admin_examine_bth_qx" value='取消'> </td>
         </tr>
     </table>
  </form> 
</div>
<div class="infoboxp">
  <div class="tabs_info">
    <ul>
      <li><a href="index.php?m=admin_company_job">全职职位</a></li>
      <li class="curr"><a href="index.php?m=admin_partjob">兼职职位</a></li>
    </ul>
  </div>
<div class="admin_new_tip">
<a href="javascript:;" class="admin_new_tip_close"></a>
<a href="javascript:;" class="admin_new_tip_open" style="display:none;"></a>
<div class="admin_new_tit"><i class="admin_new_tit_icon"></i>操作提示</div>
<div class="admin_new_tip_list_cont">
<div class="admin_new_tip_list">该页面展示了当前分站所有的兼职招聘信息，可对兼职招聘进行编辑修改操作。</div>
<div class="admin_new_tip_list">可输入名称关键字进行搜索，也可进行详细的高级搜索。</div>
</div>
</div>
<div class="clear"></div>
<div class="admin_new_search_box">
  <form action="index.php" name="myform" method="get" >
  <input type="hidden" name="m" value="admin_partjob"/>
  <input type="hidden" name="state" value="{yun:}$smarty.get.state{/yun}"/>
  <input type="hidden" name="job_type" value="{yun:}$smarty.get.job_type{/yun}"/>
  <input type="hidden" name="jtype" value="{yun:}$smarty.get.jtype{/yun}"/>
  <input type="hidden" name="salary" value="{yun:}$smarty.get.salary{/yun}"/>
    <div class="admin_new_search_name">搜索类型：</div>

 <div class="admin_Filter_text formselect"  did='dtype'>
      <input type="button" value="{yun:}if $smarty.get.type=='1'{/yun}公司名称{yun:}else{/yun}职位名称{yun:}/if{/yun}" class="admin_new_select_text"  id="btype"> 
      <input type="hidden" id='type' value="{yun:}$smarty.get.type{/yun}" name='type'>
      <div class="admin_Filter_text_box" style="display:none" id='dtype'>
        <ul>
        <li><a href="javascript:void(0)" onClick="formselect('1','type','公司名称')">公司名称</a></li>
        <li><a href="javascript:void(0)" onClick="formselect('2','type','职位名称')">职位名称</a></li> 
        </ul>  
      </div>
    </div>
   <input type="text" placeholder="输入你要搜索的关键字" name="keyword" class="admin_new_text">
   <input type="submit" name='news_search' value="搜索" class="admin_new_bth"> 


<a  href="javascript:void(0)" onclick="$('.admin_screenlist_box').toggle();"  class="admin_new_search_gj">高级搜索</a>


  </form>
 {yun:}include file="admin/admin_search.htm"{/yun}
</div>

<div class="clear"></div>

<div class="table-list">
  <div class="admin_table_border">
  <iframe id="supportiframe"  name="supportiframe" onload="returnmessage('supportiframe');" style="display:none"></iframe>
    <form action="index.php" name="myform" method="get" id='myform' target="supportiframe">
      <input name="m" value="admin_partjob" type="hidden"/>
      <input name="c" value="del" type="hidden"/>
      <table width="100%">
        <thead>
            <tr class="admin_table_top">
             <th><label for="chkall"><input type="checkbox" id='chkAll'  onclick='CheckAll(this.form)'/></label></th>
            {yun:}if $smarty.get.t=="id" && $smarty.get.order=="asc"{/yun}
            <th><a href="{yun:}searchurl order=desc t=id m=admin_partjob untype='order,t'{/yun}">编号<img src="images/sanj.jpg"/></a></th>
            {yun:}else{/yun}
      <th><a href="{yun:}searchurl order=asc t=id m=admin_partjob untype='order,t'{/yun}">编号<img src="images/sanj2.jpg"/></a></th>
            {yun:}/if{/yun}
            <th width="210" align="left">职位/公司</th> 
            <th>工作类型</th>
            <th>招聘人数</th>
            <th>结算类型</th>
            <th>薪水</th>
            <th>更新时间</th>
      <th>结束日期</th>
      <th>报名人数</th>
            <th>推荐</th>
           <th >审核</th>
        <th width="">操作</th>
        </thead>
        <tbody>
        {yun:}foreach item=v key=key from=$rows{/yun}
        <tr align="center"  {yun:}if ($key+1)%2=='0'{/yun}class="admin_com_td_bg"{yun:}/if{/yun} id="list{yun:}$v.id{/yun}">
          <td><input type="checkbox" value="{yun:}$v.id{/yun}" class="check_all"  name='del[]' onclick='unselectall()' rel="del_chk" /></td>
          <td class="td1" style="text-align:center;width:50px;"><span>{yun:}$v.id{/yun}</span></td>
          <td class="ud" align="left" width="210">
      <a href="{yun:}url m=part c=show id='`$v.id`'{/yun}" target="_blank">{yun:}$v.name{/yun}</a><br/>
          <a href="{yun:}url m=company c=show id='`$v.uid`'{/yun}" target="_blank" class="admin_cz_sc">{yun:}$v.com_name{/yun}</a>
          </td> 
          <td class="td" align="center">{yun:}$v.type{/yun}</td>
           <td class="td" align="center">{yun:}$v.number{/yun}人</td>
          <td class="td" align="center">{yun:}$v.billing_cycle{/yun}</td>
          <td>{yun:}$v.salary{/yun}{yun:}$v.salary_type{/yun}</td>
           <td class="td" align="center">{yun:}$v.lastupdate|date_format:"%Y-%m-%d"{/yun}</td>
       <td class="td" align="center">{yun:}$v.edatetxt{/yun}</td>
       <td class="td" align="center">{yun:}if $v.applynum{/yun}{yun:}$v.applynum{/yun}人<br><a href="index.php?m=admin_comlog&c=partapply&jobid={yun:}$v.id{/yun}" class="admin_cz_sc">查看报名</a>{yun:}else{/yun}暂无报名{yun:}/if{/yun}</td>
          <td id="rec{yun:}$v.id{/yun}">
          {yun:}if $v.rec_time>time(){/yun}
          <a href="javascript:void(0);" class="rec" pid="{yun:}$v.id{/yun}" tid="{yun:}$v.rec_day{/yun}" edate="{yun:}$v.recdate{/yun}" eid="{yun:}$v.rec_time{/yun}">
          <img src="../config/ajax_img/doneico.gif" alt="职位推荐剩余{yun:}$v.rec_day{/yun}天" title="职位推荐剩余{yun:}$v.rec_day{/yun}天"></a>{yun:}else{/yun}
      <a href="javascript:void(0);" class="rec" pid="{yun:}$v.id{/yun}" edate="{yun:}$v.recdate{/yun}" tid="{yun:}$v.rec_day{/yun}" eid="{yun:}$v.rec_time{/yun}">
          <img src="../config/ajax_img/errorico.gif" alt="职位推荐剩余{yun:}$v.rec_day{/yun}天" title="职位推荐剩余{yun:}$v.rec_day{/yun}天"></a>{yun:}/if{/yun}          
          </td>
          <td>{yun:}if ($v.edate lt time() && $v.edate>'0')||$v.state==2{/yun}<span class="admin_com_Lock">已过期</span>{yun:}elseif $v.state==1{/yun}<span class="admin_com_Audited">已审核</span>{yun:}elseif $v.state==0{/yun}<span class="admin_com_noAudited">未审核</span>{yun:}elseif $v.state==3{/yun}<span class="admin_com_tg">未通过</span>{yun:}/if{/yun}</td>
          <td >
          <a href="javascript:;" class="admin_new_c_bth admin_new_c_bthsh status" pid="{yun:}$v.id{/yun}" status='{yun:}$v.state{/yun}'>审核</a>
          <a href="index.php?m=admin_partjob&c=show&id={yun:}$v.id{/yun}" class="admin_new_c_bth ">修改</a> 
          <a href="javascript:void(0)" onClick="layer_del('确定要删除？', 'index.php?m=admin_partjob&c=del&id={yun:}$v.id{/yun}');" class="admin_new_c_bth admin_new_c_bth_sc">删除</a></td>
        </tr>
        {yun:}/foreach{/yun}
        <tr style="background:#f1f1f1;">
        <td align="center"><input type="checkbox" id='chkAll2' onclick='CheckAll2(this.form)' /></td>
        <td colspan="3" >
        <label for="chkAll2">全选</label>
            <input class="admin_button" type="button" name="delsub" value="审核" onClick="audall('1');" />
            <input class="admin_button" type="button" name="delsub" value="延期" onClick="audall2('0');" />
            <input class="admin_button" type="button" name="delsub" value="刷新" onClick="Refresh();" />
      <input class="admin_button" type="button" name="delsub" value="推荐" onClick="recommend();" />
            <input class="admin_button" type="button" name="delsub" value="删除" onClick="return really('del[]')" /></td>
          <td colspan="9" class="digg">{yun:}$pagenav{/yun}</td>
        </tr>
          </tbody>
      </table>
    <input type="hidden" name="pytoken" value="{yun:}$pytoken{/yun}">
    </form>
  </div>
</div>
</div>
<script type="text/javascript">
  layui.use(['layer', 'form'], function(){
    var layer = layui.layer
    ,form = layui.form
    ,$ = layui.$;
  });

function audall(status){
  var codewebarr="";
  $(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
    if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
  });
  if(codewebarr==""){
    parent.layer.msg("您还未选择任何信息！",2,8);return false;
  }else{
    $("input[name=pid]").val(codewebarr);
    $("#alertcontent").val('');
    $("input[name=status]").attr("checked",false);
    add_class('批量审核','380','230','#status_div','');
  }
}
$(function(){
  $(".status").click(function(){
    var id=$(this).attr("pid");
    $("input[name=pid]").val($(this).attr("pid"));
    var status=$(this).attr("status");
    $("#status"+status).attr("checked",true);
    layui.use(['form'],function(){
    var form = layui.form;
    form.render();
    });
    var pytoken=$("#pytoken").val();
    $.post("index.php?m=admin_partjob&c=lockinfo",{id:id,pytoken:pytoken},function(msg){
      $("#alertcontent").val(msg);
      add_class('兼职审核','380','230','#status_div','');
    });
  });
  $(".rec").click(function(){
    $("input[name=pid]").val($(this).attr("pid"));
    $("input[name=eid]").val($(this).attr("eid"));
    var edate=$(this).attr("edate");
    if($(this).attr("tid")>0){
      $("#surplus_recommend").html($(this).attr("tid")+"天+");
      $("#surplus_recommend").show();
    }
    $(".edatediv").hide();
    if(edate){
      $(".edate").html(edate);
      $(".edatediv").show();
      add_class('职位推荐','290','250','#infobox6','');
    }else{
      add_class('职位推荐','290','220','#infobox6','');
    } 
    
  });
});
function Refresh(){//批量刷新
  var codewebarr="";
  $(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
    if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
  });
  if(codewebarr==""){
    parent.layer.msg("请选择要刷新的职位！",2,8);return false;
  }else{
    $.post("index.php?m=admin_partjob&c=refresh",{ids:codewebarr,pytoken:$('#pytoken').val()},function(data){
      parent.layer.msg("刷新成功！",2,9,function(){location.reload();});
    })
  }
}
function recommend(){//批量推荐
  var codearr="";
  $(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
    if(codearr==""){codearr=$(this).val();}else{codearr=codearr+","+$(this).val();}
  });
  if(codearr==""){
      parent.layer.msg("请选择要推荐的职位！",2,8);return false;
  }else{
      $("input[name=codearr]").val(codearr);
      add_class('职位批量推荐','290','220','#infobox6','');
  }
}
function audall2(status){
  var codewebarr="";
  $(".check_all:checked").each(function(){ //由于复选框一般选中的是多个,所以可以循环输出
    if(codewebarr==""){codewebarr=$(this).val();}else{codewebarr=codewebarr+","+$(this).val();}
  });
  if(codewebarr==""){
    parent.layer.msg("您还未选择任何信息！",2,8); return false;
  }else{
    $("input[name=jobid]").val(codewebarr);
    add_class('批量延期','290','180','#infobox2','');
  }
}
</script>
</body>
</html>